# -*- coding: UTF-8 -*-

'''
Created on 23.02.2013

@author: Peter He�
'''

import numpy as np
# import math

class WaveShaper(object):
    '''
    classdocs
    '''
 

    def __init__(self):
        '''
        Constructor
        '''
        self.Output = None
        
    def update(self, Input_in = None):
        
        if ( Input_in == None):
            self.Output = None
            return; 
        # print "\rInputIn:" ,  Input_in , "\r\n"    
        values = np.radians(np.multiply(np.array(Input_in), 360))
        self.Output = (np.cos( values ) + 1.0) * 0.5
        